﻿using System.Drawing;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace AiMoWindows.Windows.Properties
{
    class PropertiesViewModel : ChangeLanguageViewModelBase
    {
        public string ScreenShotText => IsEnglish ? "ScreenShot" : "屏幕截图";
        public string InfoText => IsEnglish ? "Properties Info" : "属性信息";
        public string AuthorText => IsEnglish ? "Code Author" : "代码作者";
        public string DescriptionText => IsEnglish ? "Code Description" : "代码描述";
        public string CancelText => IsEnglish ? "Cancel" : "取消";
        public string SaveText => IsEnglish ? "Save" : "保存";
        public ImageSource? ScreenShotPicture { get; }
        public PropertiesViewModel(Bitmap? bmp)
        {
            if (bmp != null) ScreenShotPicture = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(), nint.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
        }
    }
}
